package com.mhy.app;

import androidx.appcompat.app.AppCompatActivity;

import android.os.Bundle;

import com.snda.Andro7z.Andro7za;

import java.io.File;

/**
 * @author mahongyin
 */
public class MainActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        Andro7za.run("x -p9990ppp0 -y -o/mnt/sdcard/Download/ /mnt/sdcard/Download/r.7z");
        Andro7za andro7za=new Andro7za();
        andro7za.printUsage(getCacheDir().getAbsolutePath()+"/1.rar",getCacheDir().getAbsolutePath()+"/rar");
//        Junrar.extract("/sdcard/foo.rar", "/sdcard");
//        final InputStream resourceAsStream = Foo.class.getResourceAsStream("/sdcard/foo.rar");
//        Junrar.extract(resourceAsStream, tempFolder);
      //  Extract from an InputStream to an OutputStream
//        final Archive archive = new Archive(inputStream);
//        while (true) {
//            FileHeader fileHeader = archive.nextFileHeader();
//            if (fileHeader == null) {
//                break;
//            }
//            archive.extractFile(fileHeader, outputStream);
//        }
    }
}